import time
from Sanzhou.base.base import Base
from selenium.webdriver.common.by import By

class Page(Base):

    search_01_loc=(By.ID,'suggest-align')
    search_02_loc = (By.XPATH, '/html/body/div[2]/div/section[2]/div[1]/form/fieldset/div[2]')
    def search_01(self):
        self.click(self.search_01_loc)
        time.sleep(3)

    shuru_loc=(By.NAME,'q')
    def shuru(self):
        self.send_keys(self.shuru_loc,'我在做软件测试')

    sousuo_loc=(By.XPATH,'/html/body/div[2]/div/section[2]/div[1]/form/fieldset/input[7]')
    def sousuo(self):
        self.click(self.sousuo_loc)

    yemian_loc=(By.XPATH,'//*[@id="main"]/div[2]')
    def yemian(self):
        return self.text(self.yemian_loc)

    two_loc=(By.XPATH,'//*[@id="snext"]')
    def two(self):
        self.click(self.two_loc)

    yemian_02_loc = (By.XPATH, '//*[@id="warper"]')

    def yemian_02(self) :
        return self.text(self.yemian_02_loc)